//
//  ProductTableViewCell.m
//  Project two framework
//
//  Created by 张峥 on 16/7/25.
//  Copyright © 2016年 张峥. All rights reserved.
//

#import "ProductTableViewCell.h"
#import "ZZConfig.h"
#import "ZPZNetRequest+MetalsOtherInfo.h"


@implementation ProductTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self stepUI];
    }
    return self;
}



- (void)stepUI{
    _bgImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"line_15"]];
    _bgImage.frame = CGRectMake(0, 0, SCREEN_WIDTH - 140, 45);
    [self.contentView addSubview:_bgImage];
    [self.contentView addSubview:self.titleOne];
    [self.contentView addSubview:self.titleTwo];
    [self.contentView addSubview:self.titleThree];
    [self.contentView addSubview:self.titleFour];
    [self.contentView addSubview:self.titleFive];
    [self.contentView addSubview:self.titleSix];
    [self.contentView addSubview:self.titleSeven];
    [self.contentView addSubview:self.titleEight];
    [self.contentView addSubview:self.titleNine];
    [self.contentView addSubview:self.titleTen];
    [self.contentView addSubview:self.titleElevn];
}


//懒加载
- (UILabel *)titleOne{
    if (!_titleOne) {
        _titleOne= ({
            UILabel  *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 73, 45)];
            label.font = [UIFont systemFontOfSize:13];
            label.textColor = [UIColor grayColor];
            label.numberOfLines = 2;
            label;
        });
    }
    return _titleOne;
}

- (UILabel *)titleTwo{
    if (!_titleTwo) {
        _titleTwo = ({
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(MAX_X(_titleOne.frame), 0, 166, 45)];
            label.font = [UIFont systemFontOfSize:13];
            label.textColor = [UIColor grayColor];
            label.textAlignment = NSTextAlignmentCenter;
            label;
        });
    }
    return _titleTwo;
}

- (UILabel *)titleThree{
    if (!_titleThree) {
        _titleThree = ({
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(MAX_X(_titleTwo.frame), 0, 55, 45)];
            label.font = [UIFont systemFontOfSize:13];
            label.textColor = [UIColor grayColor];
            label.textAlignment = NSTextAlignmentCenter;
            label;
        });
    }
    return _titleThree;
}

- (UILabel *)titleFour{
    if (!_titleFour) {
        _titleFour = ({
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(MAX_X(_titleThree.frame), 0, 65, 45)];
            label.font = [UIFont systemFontOfSize:13];
            label.textColor = [UIColor grayColor];
            label.textAlignment = NSTextAlignmentCenter;
            label;
        });
    }
    return _titleFour;
}

- (UILabel *)titleFive{
    if (!_titleFive) {
        _titleFive = ({
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(MAX_X(_titleFour.frame), 0, 45, 45)];
            label.font = [UIFont systemFontOfSize:13];
            label.textColor = [UIColor grayColor];
            label.textAlignment = NSTextAlignmentCenter;
            label;
        });
    }
    return _titleFive;
}

- (UILabel *)titleSix{
    if (!_titleSix) {
        _titleSix = ({
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(MAX_X(_titleFive.frame), 0, 94, 45)];
            label.font = [UIFont systemFontOfSize:13];
            label.textColor = [UIColor grayColor];
            label.textAlignment = NSTextAlignmentCenter;
            label;
        });
    }
    return _titleSix;
}

- (UILabel *)titleSeven{
    if (!_titleSeven) {
        _titleSeven = ({
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(MAX_X(_titleSix.frame), 0, 94, 45)];
            label.font = [UIFont systemFontOfSize:13];
            label.textColor = [UIColor grayColor];
            label.textAlignment = NSTextAlignmentCenter;
            label;
        });
    }
    return _titleSeven;
}

- (UILabel *)titleEight{
    if (!_titleEight) {
        _titleEight = ({
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(MAX_X(_titleSeven.frame), 0, 94, 45)];
            label.font = [UIFont systemFontOfSize:13];
            label.textColor = [UIColor grayColor];
            label.textAlignment = NSTextAlignmentCenter;
            label;
        });
    }
    return _titleEight;
}

- (UILabel *)titleNine{
    if (!_titleNine) {
        _titleNine = ({
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(MAX_X(_titleEight.frame), 0, 94, 45)];
            label.font = [UIFont systemFontOfSize:13];
            label.textColor = [UIColor grayColor];
            label.textAlignment = NSTextAlignmentCenter;
            label;
        });
    }
    return _titleNine;
}

- (UILabel *)titleTen{
    if (!_titleTen) {
        _titleTen = ({
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(MAX_X(_titleNine.frame), 0, 52, 45)];
            label.font = [UIFont systemFontOfSize:13];
            label.textColor = [UIColor grayColor];
            label.textAlignment = NSTextAlignmentCenter;
            label;
        });
    }
    return _titleTen;
}

- (UILabel *)titleElevn{
    if (!_titleElevn) {
        _titleElevn = ({
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(MAX_X(_titleTen.frame), 0, 52, 45)];
            label.font = [UIFont systemFontOfSize:13];
            label.textColor = [UIColor grayColor];
            label.textAlignment = NSTextAlignmentCenter;
            label;
        });
    }
    return _titleElevn;
}

@end
